package  
{
	import org.flixel.FlxState;
	import org.flixel.FlxText;
	import org.flixel.FlxG;
	
	/**
	 * ...
	 * @author Enric Llagostera
	 */
	public class GameOverState extends FlxState 
	{
		
		override public function create():void 
		{
			super.create();
			
			if (Registry.scoreTeam1 >= Registry.maxScore) {
				add(new FlxText(100, 100, 200, "TEAM YELLOW WON!!!! \n\n Press Start to continue."));
			}
			else {
				add(new FlxText(100, 100, 200, "TEAM PURPLE WON!!!! \n\n Press Start to continue."));
			}
			
			
		}
		
		override public function update():void 
		{
			super.update();
			
			if (FlxG.keys.pressed("ONE")) {
				FlxG.switchState(new MenuState);
			}
		}
		
	}

}